import request from '@/utils/request'

export const getEmployeeListAPi = (params) => request.get('/sys/user', { params })
// 导出员工表格接口

export function exportEmployeeAPI() {
  return request({
    url: '/sys/user/export',
    responseType: 'blob'
  })
}
export const exportTemplateAPI = () => request.get('/sys/user/import/template', { responseType: 'blob' })

export const uploadExcelAPI = data => request.post('/sys/user/import', data)

export const delEmployeeAPI = id => request.delete(`/sys/user/${id}`)

export const addEmployeeAPI = data => request.post('/sys/user', data)

export const getEmployeeDetailAPI = id => request.get(`/sys/user/${id}`)

export const updateEmloyeeAPI = (id, data) => request.put(`/sys/user/${id}`, data)
